package cn.biao.epic.sys.core.beetl;

import cn.biao.epic.base.auth.context.LoginContext;
import cn.biao.epic.base.consts.ConstantsContext;
import cn.biao.epic.core.util.ToolUtil;
import org.beetl.ext.spring.BeetlGroupUtilConfiguration;

/**
 * @Auther Uncle_Z
 * @date 2019/12/16 16:32
 * @Email:2545375@qq.com
 * @Descrition
 */
public class BeetlConfiguration extends BeetlGroupUtilConfiguration {

    private LoginContext loginContext;

    public BeetlConfiguration(LoginContext loginContext) {
        this.loginContext = loginContext;
    }

    @Override
    public void initOther() {
        groupTemplate.registerFunctionPackage("shiro", loginContext);
        groupTemplate.registerFunctionPackage("tool", new ToolUtil());
        groupTemplate.registerFunctionPackage("constants", new ConstantsContext());
    }
}
